package avicit.bdp.dds.dao.mapper;

import avicit.bdp.common.base.BaseDAO;
import avicit.bdp.dds.dao.entity.DataStat;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * udf function mapper interface
 */
public interface StateMapper extends BaseDAO<DataStat> {


    Integer getSuccessHistoryCount(@Param("projectId") String projectId);

    Integer getFailHistoryCount(@Param("projectId") String projectId);

    List<DataStat> getAllData(@Param("yesterday") String yesterday, @Param("projectIdList") List<String> projectIdList);

    List<DataStat> getDataByProjectId(@Param("yesterday") String yesterday, @Param("projectId") String projectId);

    List<Map<String, Object>> historySuccessDataList();

    List<Map<String, Object>> historyFailDataList();

    void insertListByBatch(List<DataStat> subList);

    void updateListByBatch(List<DataStat> subList);

}
